package com.tencent.wuyanzu.whattoeat;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import org.java_websocket.client.WebSocketClient;

import java.io.Serializable;


public class StartGroupFragment extends Fragment {

    private static final String ARG_PARAM1 = "param1";
    private static final String ARG_PARAM2 = "param2";

    private WebSocketClient client;

    private int groupID;


    public StartGroupFragment() {
        // Required empty public constructor
    }

    public static StartGroupFragment newInstance(WebSocketClient c,int gid) {
        StartGroupFragment fragment = new StartGroupFragment();
        Bundle args = new Bundle();
        args.putSerializable(ARG_PARAM1, (Serializable) c);
        args.putInt(ARG_PARAM2, gid);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            client = (WebSocketClient) getArguments().getSerializable(ARG_PARAM1);
            groupID=(int)getArguments().getSerializable(ARG_PARAM2);
        }
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_start_group, container, false);
    }

    public interface OnGroupNumChangeListener{
        void onGroupNumChange(int num);
    }

}
